<template>
    <div>
        <div>{{message}}</div>
        <children @childFn="parentFn" :fatherData="fatherData"></children>
    </div>
</template>
<script>
import children from '../components/children.vue'
export default {
    data(){
        return {
            fatherData:'父组件数据',
            message:'默认数据'
        }
    },
    components:{
        children
    },
    methods:{
        parentFn(payload){
            this.message = payload
            alert(payload)
        }
    }
}
</script>